double MSLUMessage(unsigned long Type, const wchar_t* Message);
Type: Message type (0 = Information; 1 = Warning; 2 = Error).
Message: Text message.
Issue message.
Always returns 0.
double MSLUTerminate(const wchar_t* Message);
Message: Text message.
Terminate model execution and issue message.
Always returns 0.
double MSLUAssert(double Condition, const wchar_t* Message);
Condition: Boolean value.
Message: Message to be issued in case "Condition" is false.
Asserts whether condition is fulfilled. In case it is not, a message is issued and model execution is terminated.
Always returns 0.
double MSLUGetStartTime(void);
Get start time of simulation.
Start time.
double MSLUGetStopTime(void);
Get stop time of simulation.
Stop time.
double MSLUSetGlobalValue(const char* GlobalName, double Value);
GlobalName: Name of global value container.
Value: Value to be stored.
Store scalar value into named global storage.
Always returns 0.
double MSLUGetGlobalValue(const char* GlobalName);
GlobalName: Name of global value container.
Retrieve scalar from named global storage.
Value.
double MSLUSetGlobalVector(const char* GlobalName, double* pValues, unsigned long NoValues);
GlobalName: Name of global value container.
Values: Values to be stored.
NoValues: Number of values.
Store vector into named global storage. A pointer to the first element of the vector, and the number of vector elements have to be passed as arguments.
Always returns 0.
double MSLUGetGlobalVector(const char* GlobalName, double* pValues, unsigned long NoValues);
GlobalName: Name of global value container.
Values: Values that have been retrieved.
NoValues: Number of values.
Retrieve vector from named global storage. A pointer to the first element of the vector, and the number of vector elements have to be passed as arguments.
Always returns 0.
char* MSLUGetPath(void);
Get file path of the executable model.
File path of the executable model.
double MSLUGetPlusInf(void);
Get largest positive double value that can be represented.
Largest positive double value.
double MSLUGetMinInf(void);
Get smallest negative double value that can be represented.
Smallest negative double value.
double MSLUGetMax2(double Value1, double Value2);
Value1: First value.
Value2: Second value
Get maximum of 2 values.
Maximum of 2 values.
double MSLUGetMin2(double Value1, double Value2);
Value1: First value.
Value2: Second value
Get minimum of 2 values.
Minimum of 2 values.
double MSLUGetSign(double Value);
Value: Argument for sign operation.
Get sign of value.
-1 in case value is strict negative; +1 in case value is strict positive; 0 otherwise.
double MSLUGetDiv(double Value1, double Value2);
Value1: Nominator.
Value2: Denominator.
Get result of integer division.
Result of integer division.
double MSLUGetMod(double Value1, double Value2);
Value1: Nominator.
Value2: Denominator.
Get remainder of integer division.
Remainder of integer division.
double MSLUGetRem(double Value1, double Value2);
Value1: Nominator.
Value2: Denominator.
Get remainder of integer division.
Remainder of integer division.
double MSLUGetSystemTime(void);
Get system time.
System time.
double MSLUSetSeed(double Seed);
Seed: Seed for RNG.
Set seed for the C run-time library's RNG.
Always returns 0.
double MSLUGetRandom(void);
Get uniformely distributed random value from the C run-time library's RNG.
Random value between 0 and 1.
double MSLUGetFac(double Value);
Value: Argument for factorial computation.
Compute factorial of "Value".
Factorial of "Value".
double MSLUGetChebyshev(double Index, double Value);
Index: index of the function. Value: Argument for Chebyshev computation.
Compute the Chebyshev value.
Chebyshev value.
double MSLUGetMax(double* Values, double NoValues);
Values: Vector of values.
NoValues: Number of values in vector.
Get maximum of vector of values.
Maximum of vector of values.
double MSLUGetMin(double* Values, double NoValues);
Values: Vector of values.
NoValues: Number of values in vector.
Get minimum of vector of values.
Minimum of vector of values.
double MSLUGetInterpolated(double* ValuesX, double* ValuesY, double NoValues, double Value);
ValuesX: Vector of X-values.
ValuesY: Vector of Y-values.
NoValues: Number of values in vector.
Value: X-value for which to perform interpolation.
Perform linear interpolation into vector of values.
Interpolated Y-value.
double MSLUGetLagrange(double* ValuesX, double* ValuesY, double NoValues, double Value);
ValuesX: Vector of X-values.
ValuesY: Vector of Y-values.
NoValues: Number of values in vector.
Value: X-value for which to perform interpolation.
Perform Lagrange interpolation into vector of values.
Interpolated Y-value.
double MSLUGetInterpValue(double* Values, double NoValues, double Value);
Values: Vector of values.
NoValues: Number of values in vector.
Value: X-value for which to perform interpolation.
Perform linear interpolation into vector of values. The vector is to be composed of "NoValues" X-values, followed by "NoValues" Y-values (so 2 * "NoValues" values in total).
Interpolated Y-value.
double MSLUFindThreshold(double* Values, double NoValues, double Threshold);
Values: Vector of values.
NoValues: Number of values in vector.
Threshold: Threshold value.
Get index of first value in vector which is larger than threshold.
Index of first value that is larger than threshold.
double MSLUFindThresholdFromEnd(double* Values, double NoValues, double Threshold);
Values: Vector of values.
NoValues: Number of values in vector.
Threshold: Threshold value.
Get index of first value in which is larger than threshold, starting from the end of the vector.
Index of first value that is larger than threshold.
double MSLUFindSum(double* Additions, double* Values, double NoValues, double Threshold);
Additions: Values to be used in sum computation.
Values: Vector of values.
NoValues: Number of values in vector.
Threshold: Threshold value.
For all values at the end of "Values" that are not smaller than "Threshold", make the sum of the corresponding values of the "Additions" array.
Sum of values.
unsigned long MSLUCalcOffset(double Size1, double Index1, double Size2, double Index2, double Size3, double Index3)
Size1: Size of first dimension.
Index1: Index of first dimension.
Size2: Size of second dimension.
Index2: Index of second dimension.
Size3: Size of third dimension.
Index3: Index of third dimenstion.
Compute the position in a flat vector of values (according to the row-major principle and starting at index 0) that corresponds with an element out of a matrix of either 1, 2 or 3 dimensions (starting at index 1).
The following situations can occur:
Flat vector index = Index1 - 1
Flat vector index = (Index1 - 1) + (Index2 - 1) * Size1
Flat vector index = (Index1 - 1) + (Index2 - 1) * Size1 + (Index3 - 1) * Size2 * Size1
Flat vector index.
unsigned long MSLUSetValue1(double* Values, double Value, double Size1, double Index1)
Values: Vector of values.
Value: Value to set.
Size1: Size of first dimension.
Index1: Index of first dimension.
Set a value in a 1-dim vector.
Always returns 0.
unsigned long MSLUSetValue2(double* Values, double Value, double Size1, double Size2, double Index1, double Index2)
Values: Vector of values.
Value: Value to set.
Size1: Size of first dimension.
Size2: Size of second dimension.
Index1: Index of first dimension.
Index2: Index of second dimension.
Set a value in a 2-dim vector.
Always returns 0.
unsigned long MSLUSetValue3(double* Values, double Value, double Size1, double Size2, double Size3, double Index1, double Index2, double Index3)
Values: Vector of values.
Value: Value to set.
Size1: Size of first dimension.
Size2: Size of second dimension.
Size3: Size of third dimension.
Index1: Index of first dimension.
Index2: Index of second dimension.
Index3: Index of third dimension.
Set a value in a 3-dim vector.
Always returns 0.
double MSLUGetValue1(double* Values, double Size1, double Index1)
pValues: Vector of values.
Size1: Size of first dimension.
Index1: Index of first dimension.
Get a value from a 1-dim vector.
Value.
double MSLUGetValue2(double* Values, double Size1, double Size2, double Index1, double Index2)
pValues: Vector of values.
Size1: Size of first dimension.
Size2: Size of second dimension.
Index1: Index of first dimension.
Index2: Index of second dimension.
Gett a value from a 2-dim vector.
Always returns 0.
double MSLUGetValue3(double* Values, double Size1, double Size2, double Size3, double Index1, double Index2, double Index3)
pValues: Vector of values.
Size1: Size of first dimension.
Size2: Size of second dimension.
Size3: Size of third dimension.
Index1: Index of first dimension.
Index2: Index of second dimension.
Index3: Index of third dimension.
Get a value from a 3-dim vector.
Value.
double Sleep(double Milliseconds)
Milliseconds: Number of milliseconds to put the thread to sleep.
Puts the executation model to sleep for a specified number of milliseconds (real-time).
0.
double Exec(const char* Program, const char* Args, const char* Path)
Program: Program to execute.
Args: Program arguments.
Path: Path.
Executes a program with the arguments and the path specified.
Exit code of program execution.
double ExecBatch(double FileID, double Arg01, double Arg02, double Arg03, double Arg04, double Arg05, double Arg06, double Arg07, double Arg08, double Arg09, double Arg10)
FileID: Batch file ID.
Arg01: Argument 1.
Arg02: Argument 2.
Arg03: Argument 3.
Arg04: Argument 4.
Arg05: Argument 5.
Arg06: Argument 6.
Arg07: Argument 7.
Arg08: Argument 8.
Arg09: Argument 9.
Arg10: Argument 10.
Executes a batch file named "BatchFile.<FileID>.bat" with a maximum of 10 arguments in the project folder.
Exit code of batch file execution.
double TimerCreate(void)
Creates a timer for real-time elapsed time measurement.
Unique identifier referring to the newly created timer.
double TimerRemove(double ID)
ID: Timer identifier.
Remove timer.
Always returns 0.
double TimerRemoveAll(void)
Remove all timers.
Always returns 0.
double TimerReset(double ID)
ID: Timer identifier.
Reset timer.
Always returns 0.
double TimerGetElapsedTime(double ID)
ID: Timer identifier.
Get elapsed time in seconds.
Always returns 0.
double MSLUTauCircularPipe(double Arel, double prevTau, double BreakupCriterion)
Arel: relative area of the pipe.
prevTau: previous value of filling level.
BreakupCriterion: break-up criterion.
Computes the filling level (Tau) for a circular pipe.
Value.